<template>
  <el-dialog title="修改引流费用" :visible.sync="dialogVisible" width="500px">
      <el-form :model="form">
        <el-form-item label="引流费用" label-width="120px">
          <el-input v-model="form.drainage_fee" placeholder="请输入引流费用" type="number"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="save">确 定</el-button>
      </div>
    </el-dialog>
</template>

<script>
import request from '@/utils/fetch'
export default {
  data() {
    return {
      dialogVisible: false,
      form: {
        orderId:'',
        drainage_fee:''
      },
      // total: 0
    };
  },
  methods: {
    save(){
        request.post('/Admin/Order/setDrainageFee',this.form).then((res)=>{
            this.$emit("getList", true)
            this.dialogVisible = false;
            this.form = {
              orderId:'',
              drainage_fee:''
            }
        })
    },
    open(row) {
      this.dialogVisible = true;
      this.form.orderId = row.id;
      this.form.drainage_fee = row.drainage_fee;
    },
  },
};
</script>

<style>
.download {
  color: rgb(39, 95, 237);
}
</style>
